//
//  MainCollectionViewCell.m
//  jianpai
//
//  Created by yrapp on 15/12/29.
//  Copyright © 2015年 yrapp. All rights reserved.
//

#import "MyShopCollectionViewCell.h"

@implementation MyShopCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        
        //self.backgroundColor = [UIColor grayColor];
        
        UIImageView *view= [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)];
        view.backgroundColor = [UIColor whiteColor];
        view.layer.cornerRadius = 5;

        view.layer.masksToBounds = YES;
//        view.layer.shadowColor = [UIColor grayColor].CGColor;//shadowColor阴影颜色
//        view.layer.shadowOffset = CGSizeMake(0,0);//shadowOffset阴影偏移，默认(0, -3),这个跟shadowRadius配合使用
//        view.layer.shadowOpacity = 1;//阴影透明度，默认0
//        view.layer.shadowRadius = 3;//阴影半径，默认3
        
        [self addSubview:view];
        
        _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height - 60)];
        _imageView.backgroundColor = [UIColor grayColor];
        [view addSubview:_imageView];
        
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageView.frame.origin.x + 5, _imageView.frame.size.height + 5, self.contentView.frame.size.width - 10, 35)];
        _titleLabel.backgroundColor = [UIColor redColor];
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.numberOfLines = 0;
        _titleLabel.font = [UIFont systemFontOfSize:12];
        [view addSubview:_titleLabel];
        
        _priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageView.frame.origin.x + 5, _titleLabel.frame.origin.y + 40,self.contentView.frame.size.width - 20 , 15)];
        //_priceLabel.text = @"¥ 600.00";
        _priceLabel.backgroundColor = [UIColor grayColor];
        
        _priceLabel.textColor = [UIColor redColor];
        _priceLabel.font = [UIFont systemFontOfSize:12];
        [view addSubview:_priceLabel];
        
    }
    
    
    return self;
    
}

//- (void)setModel:(prolistModel *)model {
//    
//    [_imageView sd_setImageWithURL:[NSURL URLWithString:model.imgsrc] placeholderImage:nil];
//    
//    _titleLabel.text = model.title;
//    
//    _priceLabel.text = [NSString stringWithFormat:@"¥ %@",model.hyj];
//    
//}





@end
